/**
 * This file is part of jFlvTool.
 *
 * jFlvTool is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * jFlvTool is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
 * file name  : CliArgs.java
 * authors    : Jon Keys
 * created    : July 9, 2007, 7:28 AM
 * copyright  : Sony Digital Authoring Services
 *
 * modifications:
 * Date:        Name:           Description:
 * ----------   --------------- ----------------------------------------------
 * July 9, 2007    Jon Keys         Creation
 */

package com.sonydadc.dw.jflv.cli;

import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;

/**
 *
 * @author Jon Keys
 */
public class CliArgs {

    public static Options getCliArgs() {

        Options options = new Options();

        Option help = new Option("help", "print this message");
        options.addOption(help);

        Option debug = new Option("debug", "print debugging information");
        options.addOption(debug);

        Option print = new Option("print", "print embedded metadata");
        options.addOption(print);

        //if metafile is defined defaults to xtraData
        Option metaname = OptionBuilder.withArgName("name")
                                    .hasArg()
                                    .withDescription("variable name to be used for extra, external metadata")
                                    .create("metaname");
        options.addOption(metaname);

        //not required
        Option metacreator = OptionBuilder.withArgName("name")
                                    .hasArg()
                                    .withDescription("embedded value of 'metadatacreator'")
                                    .create("metacreator");
        options.addOption(metacreator);

        //must be defined
        Option srcfile = OptionBuilder.withArgName("file")
                                    .hasArg()
                                    .withDescription("source flv file")
                                    .create("srcfile");
        options.addOption(srcfile);

        //defaults to original file prefixed with "out_"
        Option destfile = OptionBuilder.withArgName("file")
                                    .hasArg()
                                    .withDescription("destination for new flv file")
                                    .create("destfile");
        options.addOption(destfile);

        //not required
        Option metafile = OptionBuilder.withArgName("file")
                                    .hasArg()
                                    .withDescription("file containing extra, external metadata to be embedded")
                                    .create("metafile");
        options.addOption(metafile);

        //not required
        Option property = OptionBuilder.withArgName("var=value")
                                    .hasArg()
                                    .hasArgs()
                                    .withValueSeparator(',')
                                    .withType(java.lang.String[].class)
                                    .withDescription("embed extra metadata")
                                    .create("embed");
        options.addOption(property);

        return options;


    }//getCliArgs()

}//CliArgs
